import request from "../request";
import {PayDetailParams, PayInfoParams, PayListParams,PayRefundParams,payoutparams} from "../../types/requestTypes";
import {FetchPayDetailRes, FetchPayInfoRes, FetchPayListRes,payout} from "../../types/responseTypes";

/**
 * 获取缴费单列表
 * @param params
 */
export const getPayList = (params: PayListParams): Promise<FetchPayListRes> => request.post('/restapi/STUA_mbreport_new/RDJFDS_LIST', params, true)

/**
 * 获取缴费单详情
 * @param params
 */
export const getPayDetail = (params: PayDetailParams): Promise<FetchPayDetailRes> => request.post('/restapi/STUA_mbreport_new/RDJFDS_ID', params, true)

/**
 * 获取支付信息
 * @param params
 */
export const fetchPayInfo = (params: PayInfoParams): Promise<FetchPayInfoRes> => request.post('/STUA_wxpay/wxpayparams', params, true)

/**
 * 申请退款
 * @param params
 */
export const PayRefund = (params:PayRefundParams): Promise<any> => request.post('/restapi/STUA_mbreport_new/SQTK_CLASS', params, true)
/**
 * 微信商户订单号查询
 * @param params
 */
export const payRefout = (params:payoutparams): Promise<payout> => request.post('/STUA_wxpay/WXPAY_outtradeno_CX', params, true)
